home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / ToolUtils.p < prev    next >
Encoding:
Text File  |  1998-02-12  |  3.7 KB  |  164 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        ToolUtils.p
  3.  
  4.      Contains:    Toolbox Utilities Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1990-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT ToolUtils;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __TOOLUTILS__}
  28. {$SETC __TOOLUTILS__ := 1}
  29.  
  30. {$I+}
  31. {$SETC ToolUtilsIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __MACTYPES__}
  35. {$I MacTypes.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __OSUTILS__}
  38. {$I OSUtils.p}
  39. {$ENDC}
  40.  
  41. {$IFC OLDROUTINELOCATIONS }
  42. {$IFC UNDEFINED __FIXMATH__}
  43. {$I FixMath.p}
  44. {$ENDC}
  45. {$IFC UNDEFINED __ICONS__}
  46. {$I Icons.p}
  47. {$ENDC}
  48. {$IFC UNDEFINED __QUICKDRAW__}
  49. {$I Quickdraw.p}
  50. {$ENDC}
  51. {$IFC UNDEFINED __TEXTUTILS__}
  52. {$I TextUtils.p}
  53. {$ENDC}
  54. {$ENDC}  {OLDROUTINELOCATIONS}
  55.  
  56.  
  57. {$PUSH}
  58. {$ALIGN MAC68K}
  59. {$LibExport+}
  60.  
  61.  
  62. {
  63. ————————————————————————————————————————————————————————————————————————————————————
  64.     Note: 
  65.     
  66.     The following routines that used to be in this header file, have moved to
  67.     more appropriate headers.  If OLDROUTINELOCATIONS is 0, then you will have
  68.     to include the headers below to use the following functions.
  69.     
  70.         FixMath.h:        FixMul
  71.                         FixRatio
  72.                         FixRound
  73.         
  74.         Icons.h:          GetIcon
  75.                         PlotIcon
  76.                         
  77.         Quickdraw.h:    AngleFromSlope
  78.                         DeltaPoint
  79.                         GetCursor
  80.                         GetIndPattern
  81.                         GetPattern
  82.                         GetPicture
  83.                         PackBits
  84.                         ScreenRes
  85.                         ShieldCursor
  86.                         SlopeFromAngle
  87.                         UnpackBits
  88.                         
  89.         TextUtils.h:    Munger
  90.                         GetIndString
  91.                         GetString
  92.                         NewString
  93.                         SetString
  94. ————————————————————————————————————————————————————————————————————————————————————
  95. }
  96.  
  97.  
  98. FUNCTION BitTst(bytePtr: UNIV Ptr; bitNum: LONGINT): BOOLEAN;
  99.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  100.     INLINE $A85D;
  101.     {$ENDC}
  102. PROCEDURE BitSet(bytePtr: UNIV Ptr; bitNum: LONGINT);
  103.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  104.     INLINE $A85E;
  105.     {$ENDC}
  106. PROCEDURE BitClr(bytePtr: UNIV Ptr; bitNum: LONGINT);
  107.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  108.     INLINE $A85F;
  109.     {$ENDC}
  110. FUNCTION BitAnd(value1: LONGINT; value2: LONGINT): LONGINT;
  111.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  112.     INLINE $A858;
  113.     {$ENDC}
  114. FUNCTION BitOr(value1: LONGINT; value2: LONGINT): LONGINT;
  115.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  116.     INLINE $A85B;
  117.     {$ENDC}
  118. FUNCTION BitXor(value1: LONGINT; value2: LONGINT): LONGINT;
  119.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  120.     INLINE $A859;
  121.     {$ENDC}
  122. FUNCTION BitNot(value: LONGINT): LONGINT;
  123.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  124.     INLINE $A85A;
  125.     {$ENDC}
  126. FUNCTION BitShift(value: LONGINT; count: INTEGER): LONGINT;
  127.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  128.     INLINE $A85C;
  129.     {$ENDC}
  130. {$IFC TARGET_CPU_68K }
  131.  
  132. TYPE
  133.     Int64BitPtr = ^Int64Bit;
  134.     Int64Bit = RECORD
  135.         hiLong:                    SInt32;
  136.         loLong:                    UInt32;
  137.     END;
  138.  
  139. PROCEDURE LongMul(a: LONGINT; b: LONGINT; VAR result: Int64Bit);
  140.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  141.     INLINE $A867;
  142.     {$ENDC}
  143. {$ENDC}  {TARGET_CPU_68K}
  144.  
  145. FUNCTION HiWord(x: LONGINT): INTEGER;
  146.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  147.     INLINE $A86A;
  148.     {$ENDC}
  149. FUNCTION LoWord(x: LONGINT): INTEGER;
  150.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  151.     INLINE $A86B;
  152.     {$ENDC}
  153.  
  154. {$ALIGN RESET}
  155. {$POP}
  156.  
  157. {$SETC UsingIncludes := ToolUtilsIncludes}
  158.  
  159. {$ENDC} {__TOOLUTILS__}
  160.  
  161. {$IFC NOT UsingIncludes}
  162.  END.
  163. {$ENDC}
  164.